<template>
    <div class="hello">
       <p>axios 请求</p>
    </div>
</template>

<script>
// import axios from 'axios';
// import querystring from "querystring"

export default {
    name: "MyComponent4",
    components:{
        Swiper,
        SwiperSlide
    },
    data() {
        return {
            message:"",
            modules:[Pagination]
        }
    },
    methods(){
        // get请求方式
        axios({
            method:"get",
            url : "http://localhost//api/xxx"
        }).then(res =>{
            res.data.chendgpingDetails[0]
        })

        // post 请求方式
        axios({
            method:"post",
            url : "http://localhost//api/xxx",
            data:{
                user_id:"",
                pawword:"",
                verification_code:"crfvw"
            }
        }).then(res =>{
            console.log(res.data);
        })
    }
}

</script>
<style scoped></style>